#include "Shared_mem.hpp"
#include "Fifo.hpp"

int main()
{
    FifoOper oper(O_WRONLY);

    Shared_mem shm(ftok(DEFAULT_PATH, DEFAULT_PJID), DEFAULT_SIZE, USER);
    char* SharedArr = (char*)(shm.Begin());
    int n = shm.Size() / sizeof(char);
    for(int i = 0, index = 0; i < 26; i++, index += 2)
    {
        sleep(1);
        SharedArr[index] = i + 'A';
        sleep(1);
        SharedArr[index + 1] = i + 'A';
        oper.Write("full");
    }
    return 0;
}